<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ include file="/admin/common/inc/incSession.jsp" %>
<%

	int result = 0;
	
	try {


		String idx = request.getParameter("idx");
		String event_type = request.getParameter("eventType");
		String recruit_no = request.getParameter("recruitNo");
		String req_fdate = request.getParameter("reqFdate").replaceAll("-","");
		String req_tdate = request.getParameter("reqTdate").replaceAll("-","");
		String win_date = request.getParameter("winDate").replaceAll("-","");
		String review_fdate = request.getParameter("reviewFdate").replaceAll("-","");
		String review_tdate = request.getParameter("reviewTdate").replaceAll("-","");
		String provide_date = request.getParameter("provideDate").replaceAll("-","");
		String good_reviewer_no = request.getParameter("goodReviewerNo");
		String good_reviewer_gift = request.getParameter("goodReviewerGift");
		String choose_rate = request.getParameter("chooseRate");
		String company_name = request.getParameter("companyName");
		String homepage = request.getParameter("homepage");
		String name = request.getParameter("userName");
		String tel_no = request.getParameter("telNo");
		String email = request.getParameter("email");
		String zipcode = request.getParameter("zipCode");
		String addr = request.getParameter("addr");
		String addr2 = request.getParameter("addr2");
		String memo = request.getParameter("memo");
		
		param.put("idx",idx);
		param.put("event_type",event_type);
		param.put("recruit_no",recruit_no);
		param.put("req_fdate",req_fdate);
		param.put("req_tdate",req_tdate);
		param.put("win_date",win_date);
		param.put("review_fdate",review_fdate);
		param.put("review_tdate",review_tdate);
		param.put("provide_date",provide_date);
		param.put("good_reviewer_no",good_reviewer_no);
		param.put("good_reviewer_gift",good_reviewer_gift);
		param.put("choose_rate",choose_rate);
		param.put("company_name",company_name);
		param.put("homepage",homepage);
		param.put("name",name);
		param.put("tel_no",tel_no);
		param.put("email",email);
		param.put("provide_date",provide_date);
		param.put("zipcode",zipcode);
		param.put("addr",addr);
		param.put("addr2",addr2);
		param.put("memo",memo);
		
		
		
			
		result = sqlMap.update("AdminAlliance.updateAlliance",param);
		
		
		if(result > 0 ){
			
			out.print("<script>alert('제휴문의 수정을 성공하였습니다.');</script>");
			out.print("<script>parent.location.href = 'allianceDetail.jsp?idx="+idx+"'</script>");
			
		} else {
			
			throw new Exception();
		}

	} catch (Exception e) {
			out.print("<script>alert('제휴문의 수정에 실패하였습니다.');</script>");
		    e.printStackTrace();
	}
%>